using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter04
{
	/// <summary>
	/// Example08: The Centripetal Acceleration of the Earth
	/// What is the centripetal acceleration of the Earth as it 
	/// moves in its orbit around the Sun?
	/// distance between sun and earth = 1.496 \times 10^11 m
	/// a_c = 5.93 \times 10^{-3} m/s^2
	/// </summary>
	public class Example08
	{
		public Example08()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			// a = v^2/r;
			L.Length r = new L.Length();
			r.m = 1.496*Math.Pow(10,11);
			L.Time t = new L.Time();
            t.s = 365.0*24.0*3600.0;
			L.Velocity v = new L.Velocity();
			v.X = -2.0*Math.PI*r.m/t.s;
			L.Acceleration a = new L.Acceleration();
			a.Y = -v.mPERs*v.mPERs/r.m;
            result += a.ToString();
		}
	}
}
